import { TBY } from '@/api/config/servicePort'
import http from '@/api'

export namespace FireRating {
  export interface Form {
    id: number
    fireDangerRating: string
  }

  export const fireRatingEnum = [
    { value: '0', label: '非防期' },
    { value: '1', label: '一级' },
    { value: '2', label: '二级' },
    { value: '3', label: '三级' },
    { value: '4', label: '四级' },
    { value: '5', label: '五级' }
  ]
}

// 详情
export const getFireRatingDetail = () => {
  return http.get<Partial<FireRating.Form>>(TBY + `/fire_rating/get`, { loading: false })
}

// 新增或修改
export const saveOrUpdateFireRating = (params: Partial<FireRating.Form>) => {
  return http.post(TBY + `/fire_rating/save`, params)
}
